<!-- inc:header -->
<div class="notice"><div class="p">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="130px"><span class="lead">&nbsp;&raquo; 添加/修改底部导航</span></td>
		<td align="right"><a href="{:site_url('nav')}" class="button">导航列表</a></td>
	</tr>
	</table>
</div></div>


<form method="post" action="{:site_url('nav,setok')}id={:$id}" onsubmit="return to_setok('{:$id}')">
<div class="table">
	<div class="left"><span class="red">*</span> 名称：</div>
	<input type="text" name="title" id="title" value="{:$rs[title]}">
	<span class="clue_on"> 名称不允许为空</span>
</div>
<input type="hidden" id="parentid" name="parentid" value="0" />
<div class="table">
	<div class="left"><span class="red">*</span> 链接：</div>
	<input type="text" name="link" id="link" value="{:$rs[link]}" class="long_input">
</div>
<div class="table">
	<div class="left">伪静态链接：</div>
	<input type="text" name="link_rewrite" id="link_rewrite" value="{:$rs[link_rewrite]}" class="long_input">
</div>
<div class="table">
	<div class="left">静态页链接：</div>
	<input type="text" name="link_html" id="link_html" value="{:$rs[link_html]}" class="long_input">
</div>
<div class="table">
	<div class="left">链接格式：</div>
	<input type="button" class="btn2" value="首页" onclick="to_home()" />
	<input type="button" class="btn3" value="购物车" onclick="to_cart()" />
	<input type="button" class="btn3" value="语言包" onclick="to_link('lang')" />
	<input type="button" class="btn2" value="模块" onclick="to_link('module')" />
	<input type="button" class="btn2" value="分类" onclick="to_link('cate')" />
	<input type="button" class="btn2" value="主题" onclick="to_link('subject')" />
	<span class="clue_on">不清楚如何创建链接，请点击按钮进行选择</span>
</div>


<div class="table">
	<div class="left">打开方式：</div>
	<table>
	<tr>
		<td><input type="radio" name="target" value="1"{if($rs[target])} checked{end} /></td>
		<td>新窗口&nbsp;</td>
		<td><input type="radio" name="target" value="0"{if(!$rs[target])} checked{end} /></td>
		<td>原窗口</td>
	</tr>
	</table>
</div>

<div class="table">
	<div class="left">提示：</div>
	<input type="text" name="note" id="note" value="{:$rs[note]}" class="long_input">
	<span class="clue_on">[鼠标移到菜单时的文字提示，为空使用标题提示]</span>
</div>

<div class="table">
	<div class="left">排序：</div>
	<input type="text" name="taxis" id="taxis" value="{:$rs[taxis] ? $rs[taxis] : 255}" class="short_input">
	<span class="clue_on">[请填写排序值，最大为255，值越小越往前靠]</span>
</div>

<div class="table">
	<div class="left">&nbsp;</div>
	<input type="submit" id="qgbutton" class="btn3" value="提 交">
</div>
</form>

<script type="text/javascript">
var gd_url = base_file + "?"+base_ctrl+"=nav&"+base_func+"=";
//[对输入的数据进行检测]
function to_setok(id)
{
	var subject = getid("title").value;
	if(!subject || subject == "undefined")
	{
		alert("标题不允许为空");
		return false;
	}
	var linkurl = getid("link").value;
	if(!linkurl || linkurl == "undefined")
	{
		alert("网址不允许为空");
		return false;
	}
	getid("qgbutton").disabled = true;
	return true;
}
function to_link(t)
{
	var turl = base_file + "?"+base_ctrl+"=link&"+base_func+"="+t;
	Layer.init(turl,550,400);
}
function to_home()
{
	getid("link").value = "{index_php}";
	getid("link_rewrite").value = "index.html";
	getid("link_html").value = "{site_html}";
	return true;
}
function to_cart()
{
	getid("link").value = "{index_php}?{control_trigger}=cart";
	getid("link_rewrite").value = "{index_php}?{control_trigger}=cart";
	getid("link_html").value = "{site_url}{index_php}?{control_trigger}=cart";
	return true;
}
</script>

<!-- inc:footer -->